// by Jens Schmidt 2009
// for: YOU
// use, modify, copy this as you like

var Albums = Class.create({
	initialize: function() {
		this.albumsCookie = new Mojo.Model.Cookie('albumslist');
		
		this.albums=0;
		this.load();
	},

	// loads settings from a cookie.
	load: function() {
		if (this.albumsCookie) {
			var tmp=this.albumsCookie.get();
			if (tmp) {
				this.albums = tmp.evalJSON();
			}
		}
	},

	set: function(aAlbums) {
		if (this.albumsCookie) {
			if (aAlbums) {
				this.settingsCookieName.put(Object.toJSON(aAlbums));
			}else{
				this.settingsCookieName.put(0);
			}
		}	
	}
});
